/**
 * Credit where credit is due!
 * http://www.ibm.com/developerworks/java/library/j-grails03118/
 *
 * Awesome tutorial and example.  it was so good, i ninja'ed the copyright taglib
 */

package com.cgah



class CopyRightTagLib {
 static namespace = 'cgah'

  def thisYear = {
    out << Calendar.getInstance().get(Calendar.YEAR)
  }
  def copyright = { attributes, body ->
    out << "<div id='copyright'>"
    out << "&copy; ${attributes['startYear']} - ${thisYear()}, ${body()}"
    out << " All Rights Reserved."
    out << "</div>"
  }
}
